/**
 * User: alesj
 * Date: 2004.9.7
 * Time: 12:24:22
 */

package com.alesj.newsfeed.web.form;

import com.alesj.newsfeed.data.Contact;
import com.alesj.newsfeed.data.GroupEntry;
import com.generalynx.common.data.IEntity;
import com.generalynx.common.resources.Resources;
import com.generalynx.ecos.web.form.AbstractSingleSelectForm;

import java.util.Set;

public class EntryContactSelectForm extends AbstractSingleSelectForm {

    protected String getHeaderLabel() {
        return Resources.getString(Resources.FILTER);
    }

    protected String getBodyLabel() {
        return Resources.getString(Resources.CONTACTS);
    }

    protected Class getEntityClass() {
        return GroupEntry.class;
    }

    protected Class getMembersClass() {
        return Contact.class;
    }

    protected Set getMembers(IEntity entity) {
        return ((GroupEntry)entity).getContacts();
    }

}
